import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
import { NzSafeAny } from 'ng-zorro-antd/core/types';

@Component({
  selector: 'app-type',
  templateUrl: './type.component.html',
  styleUrls: ['./type.component.less'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class TypeComponent implements OnInit {
  // dataList: NzSafeAny[] = []; // 需修改为对应业务的数据类型
  constructor() {};
  dataList: NzSafeAny[] = [
    {
      id: 1,
      name: 'Incident',
      validID: '1',
      createBy: 'admin',
      createTime: '2022-12-12 12:12:10',
      changeBy: 'admin',
      changeTime: '2022-12-12 12:12:10'
    },
    {
      id: 2,
      name: 'Problem',
      validID: '1',
      createBy: 'admin2',
      createTime: '2021-12-12 12:12:10',
      changeBy: 'admin2',
      changeTime: '2021-12-12 12:12:10'
    }
  ];
  ngOnInit(): void {
  }
  reloadTable(): void {
    
  }
  add(): void {
    // this.modalService.show({nzTitle: '新增'}).subscribe((res) => {
    //   if (!res || res.status === ModalBtnStatus.Cancel) {
    //     return;
    //   }
    //   this.tableLoading(true);
    //   this.addEditData(res.modalValue, 'addFireSys');
    // }, error => this.tableLoading(false));
  }
  edit(id: number): void {
    // this.dataService.getFireSysDetail(id).subscribe(res => {
    //   this.modalService.show({nzTitle: '编辑'}, res).subscribe(({modalValue, status}) => {
    //     if (status === ModalBtnStatus.Cancel) {
    //       return;
    //     }
    //     modalValue.id = id;
    //     this.tableLoading(true);
    //     this.addEditData(modalValue, 'editFireSys');
    //   }, error => this.tableLoading(false));
    // });
  }
  deleteOne(id: number): void {

  }
}
